package com.blog.effective.note9;

/**
 * 〈一句话功能简述〉<br>
 *
 * @author 未绪
 * @time 2018/1/2 15:57
 */
public class TestDemo {

    public static void main(String[] args) {
//
//        PhoneNumber phoneNumber1 = new PhoneNumber("123", "FZ");
//        PhoneNumber phoneNumber2 = new PhoneNumber("123", "FZ");
//
//        System.out.println(phoneNumber1.hashCode());        //621009875
//        System.out.println(phoneNumber2.hashCode());        //1265094477
//
//        System.out.println(phoneNumber1.equals(phoneNumber2));//true
//
//
//        /*--------------------------------------*/
//
//        HashMap<PhoneNumber, String> hashMap = new HashMap<>();
//
//        PhoneNumber number = new PhoneNumber("123", "FZ");
//        hashMap.put(number,"张三");
//
//        hashMap.get(new PhoneNumber("123","FZ"));
//
//        Integer num1=new Integer(10);
//        Integer num2=new Integer(20);
//
//        System.out.println(num1.hashCode());    //10
//        System.out.println(num2.hashCode());    //20
//

//        String str1=new String ("10");
//        String str2=new String ("10");
//
//        System.out.println(str1.hashCode());
//        System.out.println(str2.hashCode());
//
//        Boolean b1=Boolean.FALSE;
//        Boolean b2=Boolean.TRUE;
//
//        System.out.println(b1.hashCode());
//        System.out.println(b2.hashCode());
        int n1=223;
        int n2=246;

        System.out.println(Integer.toBinaryString(n1));
        System.out.println(Integer.toBinaryString(n2));
        System.out.println(Integer.toBinaryString(n1 ^ n2));

        Float f=11.3f;
        System.out.println(f.hashCode());
    }

}